import React, { Component } from 'react';
import {
    View,
    Text,
    TouchableOpacity,
} from 'react-native';

import { resumefiveStyle as styles } from '../../../../../styles';
import Icon from 'react-native-vector-icons/Ionicons';
import fmt from '../../../../util/fmtDateUtil';

export default class Re_education5_1 extends Component {
    // 初始化模拟数据
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <View style={styles.listfive}>
                <View style={styles.ninesp}>
                    <View style={styles.fiveallin}>
                        <View style={styles.fiveev1}>
                            <Text style={styles.fivetxt1}>{this.props.xzResumeEducation.educationSchool}</Text>
                            <Text style={styles.fivetxt1}>（<Text>{fmt(this.props.xzResumeEducation.enrollmentDate, 'yyyy-MM-dd')}</Text>-<Text>{fmt(this.props.xzResumeEducation.graduateDate, 'yyyy-MM-dd')}</Text>）</Text>
                        </View>
                        <Text style={styles.fiveev3}>专业名称：<Text style={styles.fivetxt1}>{this.props.xzResumeEducation.educationMajor}</Text></Text>
                        <View style={styles.fiveev2}>
                            <Text style={styles.fivetxt2}>学历：<Text style={styles.fivetxt1}>{this.props.xzResumeEducation.educationLevel}</Text></Text>
                            <Text style={styles.fivetxt2}>是否是统招：
                            <Text style={styles.fivetxt1}>
                                    {this.props.xzResumeEducation.educationEntrance == 0 ? '否' :
                                        this.props.xzResumeEducation.educationEntrance == 1 ? '是' : null}
                                </Text></Text>
                        </View>
                    </View>

                    <TouchableOpacity activeOpacity={1} style={styles.touch}
                        onPress={() => { this.goGet('Reduedit', this.props.resume, this.props.xzResumeEducation, this.props.actions) }}>
                        <Icon
                            name={'md-create'}
                            size={16}
                            color={'#3d9ccc'} />
                    </TouchableOpacity>
                </View>
            </View>
        );
    }
    goGet(name, object, xzResumeEducation, action) {
        this.props.navigation.navigate(name, { resume: object, xzResumeEducation: xzResumeEducation, actions: action });
    }
}